package com.bean;

import java.math.BigDecimal;

public class OrderItem {

    private Integer id;//
    private  String name;//
    private Integer count;//
    private BigDecimal price;//
    private BigDecimal totalprice;//
    private Integer flowerid;
    private String enterpriseid;//
    private  String orderid;
    private Integer status=0;//未发货
    private Enterprise enterprise;
    private User user;

    public OrderItem() {
    }

    public OrderItem(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTotalprice() {
        return totalprice;
    }

    public void setTotalprice(BigDecimal totalprice) {
        this.totalprice = totalprice;
    }

    public Integer getFlowerid() {
        return flowerid;
    }

    public void setFlowerid(Integer flowerid) {
        this.flowerid = flowerid;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getEnterpriseid() {
        return enterpriseid;
    }

    public void setEnterpriseid(String enterpriseid) {
        this.enterpriseid = enterpriseid;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Enterprise getEnterprise() {
        return enterprise;
    }

    public void setEnterprise(Enterprise enterprise) {
        this.enterprise = enterprise;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public OrderItem(String name, Integer count, BigDecimal price, BigDecimal totalprice, Integer flowerid, String enterpriseid, String orderid) {
        this.name = name;
        this.count = count;
        this.price = price;
        this.totalprice = totalprice;
        this.flowerid = flowerid;
        this.enterpriseid = enterpriseid;
        this.orderid = orderid;
    }

    public OrderItem(Integer id, String name, Integer count, BigDecimal price, BigDecimal totalprice, Integer flowerid, String enterpriseid, String orderid, Integer status) {
        this.id = id;
        this.name = name;
        this.count = count;
        this.price = price;
        this.totalprice = totalprice;
        this.flowerid = flowerid;
        this.enterpriseid = enterpriseid;
        this.orderid = orderid;
        if(status!=null && !"".equals(status)){
            this.status = status;
        }
    }

    public OrderItem(Integer id, String name, Integer count, BigDecimal price, BigDecimal totalprice, Integer flowerid, String enterpriseid, String orderid, Integer status, Enterprise enterprise) {
        this.id = id;
        this.name = name;
        this.count = count;
        this.price = price;
        this.totalprice = totalprice;
        this.flowerid = flowerid;
        this.enterpriseid = enterpriseid;
        this.orderid = orderid;
        //this.status = status;
        if(status!=null && !"".equals(status)){
            this.status = status;
        }
        this.enterprise = enterprise;
    }

    public OrderItem(Integer id, String name, Integer count, BigDecimal price, BigDecimal totalprice, Integer flowerid, String enterpriseid, String orderid, Integer status, Enterprise enterprise, User user) {
        this.id = id;
        this.name = name;
        this.count = count;
        this.price = price;
        this.totalprice = totalprice;
        this.flowerid = flowerid;
        this.enterpriseid = enterpriseid;
        this.orderid = orderid;
        //this.status = status;
        if(status!=null && !"".equals(status)){
            this.status = status;
        }
        this.enterprise = enterprise;
        this.user = user;
    }

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", count=" + count +
                ", price=" + price +
                ", totalprice=" + totalprice +
                ", flowerid=" + flowerid +
                ", enterpriseid='" + enterpriseid + '\'' +
                ", orderid='" + orderid + '\'' +
                ", status=" + status +
                ", enterprise=" + enterprise +
                ", user=" + user +
                '}';
    }
}
